<template>
<div class="dashboard">
  <van-picker title="标题" v-model="fieldValue" :columns=" columns " @confirm=" onConfirm " @cancel=" onCancel " />
</div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import { showToast } from 'vant'

const fieldValue = ref(false)

const columns = [
  { text: '杭州', value: 'Hangzhou' },
  { text: '宁波', value: 'Ningbo' },
  { text: '温州', value: 'Wenzhou' },
  { text: '绍兴', value: 'Shaoxing' },
  { text: '湖州', value: 'Huzhou' }
]
const onConfirm = (value: any) => {
  console.log(value)
  showToast('确认')
}
const onCancel = () => {
  console.log('取消')
}
</script>

<style lang="scss" scoped></style>